home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club (Business) 1997 July / Software of the Month Club - Business (Volume 239) (July 1997).iso / pc / code / d.dxr / 00015_DJ CODE.ls < prev    next >
Encoding:
Text File  |  1996-02-15  |  6.6 KB  |  180 lines

  1. global HARP, TIGO, HORN, DRUM, CHIME, BASS, sPALETTE, gObjects, gOBJECTSD, gWorld, gPuppetlines, sQTCharSprite, gNextEnvLetter, gMIDIPlayTRUE, gInitalized, noteObjs, windowsMIDIXObj, xNAVXOBJ, xCURXOBJ, gCPU, gFileSep, gRootPath, gHDpath, gXobjs, gXOBJPath, gCDpath, gCDName
  2.  
  3. on DoJumptoE01
  4.   genexitkf(#E01)
  5. end
  6.  
  7. on doDJVid
  8.   DoCharacterMovie(#DJVid)
  9. end
  10.  
  11. on EnterCharConditonD07
  12.   set OBj to getaProp(gObjects, #DJVid)
  13.   set radioStation to getaProp(getaProp(gStates, #Conditions), #radioStation)
  14.   if radioStation = 0 then
  15.     if voidp(getaProp(getaProp(gStates, #BeenThere), #D07)) then
  16.       setaProp(OBj, #DisplayState, 1)
  17.     else
  18.       if (getaProp(getaProp(gStates, #BeenThere), #D07) > 0) and voidp(getaProp(getaProp(gStates, #BeenThere), #D22)) then
  19.         set Played to #false
  20.         repeat with HERE in [#D05, #D06, #D08, #D09, #D10, #D12]
  21.           if voidp(getaProp(getaProp(gStates, #BeenThere), HERE)) then
  22.             next repeat
  23.             next repeat
  24.           end if
  25.           set Played to #true
  26.           exit repeat
  27.         end repeat
  28.         if Played = #true then
  29.           if getaProp(OBj, #DisplayState) >= 5 then
  30.             setaProp(OBj, #DisplayState, 6)
  31.           else
  32.             if getaProp(OBj, #DisplayState) = 4 then
  33.               setaProp(OBj, #DisplayState, 5)
  34.             else
  35.               if getaProp(OBj, #DisplayState) = 3 then
  36.                 setaProp(OBj, #DisplayState, 4)
  37.               else
  38.                 setaProp(OBj, #DisplayState, 3)
  39.               end if
  40.             end if
  41.           end if
  42.         else
  43.           if Played = #false then
  44.             setaProp(OBj, #DisplayState, 2)
  45.           end if
  46.         end if
  47.       else
  48.         if getaProp(getaProp(gStates, #BeenThere), #D22) > 0 then
  49.           set Chaotic to #true
  50.           set monitorTuned to #true
  51.           set gotNotes to #true
  52.           repeat with HERE in [#DRUM, #HORN, #timur, #HARP, #CHIME, #BASS]
  53.             if getaProp(getaProp(gObjects, HERE), #State) = #nonChaotic then
  54.               set Chaotic to #false
  55.               exit repeat
  56.             end if
  57.           end repeat
  58.           set MonNUm to getaProp(getaProp(gObjects, #HORNmonitor), #DisplayState)
  59.           repeat with HERE in [#DRUMmonitor, #TIMURmonitor, #HARPmonitor, #CHIMEmonitor, #BASSmonitor]
  60.             if getaProp(getaProp(gObjects, HERE), #DisplayState) <> MonNUm then
  61.               set monitorTuned to #false
  62.               exit repeat
  63.             end if
  64.           end repeat
  65.           repeat with HERE in [#DRUM, #HORN, #timur, #HARP, #CHIME, #BASS]
  66.             if getaProp(gNotes, #HORNmonitor) = [] then
  67.               set gotNotes to #false
  68.               exit repeat
  69.             end if
  70.           end repeat
  71.           if Chaotic = #false then
  72.             if getaProp(OBj, #DisplayState) >= 8 then
  73.               setaProp(OBj, #DisplayState, 9)
  74.             else
  75.               if getaProp(OBj, #DisplayState) = 7 then
  76.                 setaProp(OBj, #DisplayState, 8)
  77.               else
  78.                 setaProp(OBj, #DisplayState, 7)
  79.               end if
  80.             end if
  81.           else
  82.             if (monitorTuned = #false) and (Chaotic = #true) then
  83.               if getaProp(OBj, #DisplayState) >= 11 then
  84.                 setaProp(OBj, #DisplayState, 12)
  85.               else
  86.                 if getaProp(OBj, #DisplayState) = 10 then
  87.                   setaProp(OBj, #DisplayState, 11)
  88.                 else
  89.                   setaProp(OBj, #DisplayState, 10)
  90.                 end if
  91.               end if
  92.             else
  93.               if (monitorTuned = #true) and (Chaotic = #true) and (gotNotes = #false) and (getaProp(OBj, #DisplayState) < 13) then
  94.                 setaProp(OBj, #DisplayState, 13)
  95.               else
  96.                 setaProp(OBj, #DisplayState, 14)
  97.               end if
  98.             end if
  99.           end if
  100.         end if
  101.       end if
  102.     end if
  103.     setaProp(OBj, #ConCount, 1)
  104.   else
  105.     if (radioStation <> 0) and (getaProp(OBj, #newhit) = #true) then
  106.       set curCredits to getaProp(gStates, #Credits)
  107.       MakeDynamic(#DJVid, #newhit, #false)
  108.       deleteProp(OBj, #DisplayCount)
  109.       if radioStation = 1 then
  110.         if getaProp(OBj, #DisplayState) <> 15 then
  111.           setaProp(OBj, #DisplayState, 15)
  112.           setaProp(gStates, #Credits, curCredits + 5000)
  113.           PDARelease("J04m14p.mov")
  114.           setaProp(OBj, #ConCount, 1)
  115.         end if
  116.       else
  117.         if radioStation = 2 then
  118.           if getaProp(OBj, #DisplayState) <> 16 then
  119.             setaProp(OBj, #DisplayState, 16)
  120.             setaProp(gStates, #Credits, curCredits + 1500)
  121.             setaProp(OBj, #ConCount, 1)
  122.           end if
  123.         else
  124.           if radioStation = 3 then
  125.             if getaProp(OBj, #DisplayState) <> 17 then
  126.               setaProp(OBj, #DisplayState, 17)
  127.               setaProp(gStates, #Credits, curCredits + 1000)
  128.               setaProp(OBj, #ConCount, 1)
  129.             end if
  130.           else
  131.             if radioStation = 4 then
  132.               if getaProp(OBj, #DisplayState) <> 18 then
  133.                 setaProp(OBj, #DisplayState, 18)
  134.                 setaProp(gStates, #Credits, curCredits + 750)
  135.                 setaProp(OBj, #ConCount, 1)
  136.               end if
  137.             else
  138.               if (radioStation < 14) and (radioStation > 4) then
  139.                 setaProp(OBj, #DisplayState, 19)
  140.                 setaProp(gStates, #Credits, curCredits + 750)
  141.                 setaProp(OBj, #ConCount, 1)
  142.               else
  143.                 if radioStation = 14 then
  144.                   if getaProp(OBj, #DisplayState) <> 20 then
  145.                     setaProp(OBj, #DisplayState, 20)
  146.                     setaProp(gStates, #Credits, curCredits + 750)
  147.                     setaProp(OBj, #ConCount, 1)
  148.                   end if
  149.                 else
  150.                   if radioStation = 15 then
  151.                     if getaProp(OBj, #DisplayState) <> 21 then
  152.                       setaProp(OBj, #DisplayState, 21)
  153.                       setaProp(gStates, #Credits, curCredits + 750)
  154.                       setaProp(OBj, #ConCount, 1)
  155.                     end if
  156.                   else
  157.                     if radioStation > 15 then
  158.                       setaProp(OBj, #DisplayState, 22)
  159.                       setaProp(OBj, #ConCount, 1)
  160.                     end if
  161.                   end if
  162.                 end if
  163.               end if
  164.             end if
  165.           end if
  166.         end if
  167.       end if
  168.     else
  169.       if (radioStation <> 0) and (getaProp(OBj, #newhit) = #enter) then
  170.         setaProp(OBj, #DisplayState, 23)
  171.         setaProp(OBj, #ConCount, 1)
  172.       else
  173.         setaProp(OBj, #DisplayCount, 2)
  174.       end if
  175.     end if
  176.   end if
  177.   MakeDynamic(#DJVid, #DisplayState, getaProp(OBj, #DisplayState))
  178.   MakeDynamic(#DJVid, #ConCount, getaProp(OBj, #ConCount))
  179. end
  180.